/**
 * 	*****************************************************************************
 *				datepicker 插件域 闭包处理    作者：张鹏鹏   电话：15158822934
 *	*****************************************************************************
 */
(function($){
	
	$.fn.dpqc_datepicker = function(options){
		var defaluts = 
		{
			 id:"#data_1 .input-group.date",
			 type:"1",
			 todayBtn: "linked",
             keyboardNavigation: false,
             forceParse: false,
             calendarWeeks: true,
             autoclose: true,
             startView: 1,
             format: "yyyy-mm-dd",
             todayHighlight:true
             
		};
		var opts = $.extend(defaluts, options);
		
		if(opts.type == "1")
		{
			$(opts.id).datepicker({
				todayBtn: "linked",
                keyboardNavigation: opts.keyboardNavigation,
                forceParse: opts.forceParse,
                calendarWeeks: opts.calendarWeeks,
                autoclose: opts.autoclose
            });
			return;
		}
		
		if(opts.type == "2")
		{
			$(opts.id).datepicker({
                startView: opts.startView,
                todayBtn: "linked",
                keyboardNavigation: opts.keyboardNavigation,
                forceParse: opts.forceParse,
                autoclose: opts.autoclose,
                format: opts.format
            });
			
			return;
		}
		
		if(opts.type == "3")
		{
			
			 $(opts.id).datepicker({
	            startView: opts.startView,
	            todayBtn: "linked",
	            keyboardNavigation: opts.keyboardNavigation,
	            forceParse: opts.forceParse,
	            autoclose: opts.autoclose
	         });
			 
			 return;
		}
		
		if(opts.type == "4")
		{
			$(opts.id).datepicker({
	             minViewMode: 1,
	             keyboardNavigation: opts.keyboardNavigation,
	             forceParse: opts.forceParse,
	             autoclose: opts.autoclose,
	             todayHighlight: opts.todayHighlight
	       });
			
		   return;
		}
		
		
		$(opts.id).datepicker({
            keyboardNavigation: opts.ikeyboardNavigation,
            forceParse: opts.forceParse,
            autoclose: opts.autoclose,
            format: "yyyy-mm-dd",
        });
	};
	
})(jQuery);